package com.d0327.homework;

import java.util.Scanner;

public class SortTest1 {
    static double a;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String string;
        double sc;
        string = scanner.nextLine();
        while (true) {
            string = scanner.next();
            if(!string.equals("^[0-9]*$")){
                System.out.println("不行");
                break;
            }
            if (string.equals("exit")) {
                System.out.println(a);
                System.exit(0);
            }
            double num = Double.valueOf(string);
            a += num;
        }
    }

}
